package com.jlcloud.core.oauth2.utils;

import lombok.extern.slf4j.Slf4j;
import com.jlcloud.core.oauth2.exception.OAuth2Exception;
import com.jlcloud.core.oauth2.provider.OAuth2Request;

/**
 * OAuth2LogUtil
 *
 * @author By: JlCloud <br>
 * @Package: com.jlcloud <br>
 * @CreateTime: 2024-12-03 21:45 <br>
 * @Copyright: 2021 www.jilianjituan.com Inc. All rights reserved. <br>
 * @Caution 注意：本内容仅限于冀联人力集团内部传阅，禁止外泄以及用于其他的商业目的 <br>
 */
@Slf4j
public class OAuth2LogUtil {

	public static void logOAuth2Exception(OAuth2Exception ex, OAuth2Request request, boolean isProd) {
		if (!isProd) {
			log.warn("----------OAuth2认证异常，具体信息如下----------");
			log.warn("OAuth2Request: {}", request);
			log.warn("OAuth2Exception: ", ex);
			log.warn("--------------------------------------------");
		}
	}

}
